import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询Tiff列表
export function listTiff(query) {
  return request({
    url: '/business/tiff/list',
    method: 'get',
    params: query
  })
}

// 查询Tiff详细
export function getTiff(tiffId) {
  return request({
    url: '/business/tiff/' + parseStrEmpty(tiffId),
    method: 'get'
  })
}

// 新增用户
export function addTiff(data) {
  return request({
    url: '/business/tiff/add',
    method: 'post',
    data: data
  })
}

// 修改用户
export function updateTiff(data) {
  return request({
    url: '/business/tiff/edit',
    method: 'post',
    data: data
  })
}

// 删除用户
export function delTiff(ids) {
  return request({
    url: '/business/tiff/' + ids,
    method: 'delete'
  })
}

// 分享密码重置
export function createShareUrl(id) {
  return request({
    url: '/business/tiff/createShareUrl/' + id,
    method: 'post'
  })
}

// 分割图片
export function segment(id) {
  return request({
    url: '/business/tiff/segment/' + id,
    method: 'post'
  })
}

// Tiff状态修改
export function changeTiffStatus(id, status) {
  return request({
    url: '/business/tiff/changeStatus/' + id + '/' + status,
    method: 'post',
  })
}

// Tiff状态修改
export function downloadTiff(id) {
  return request({
    url: '/business/tiff/downloadTiff/' + id,
    method: 'get',
  })
}

// Tiff状态修改
export function previewTiff(id) {
  return request({
    url: '/business/tiff/previewTiff/' + id,
    method: 'get',
  })
}




